import logging
def log():
    logging.basicConfig(
        filename='log1.log',
        filemode='w+',
        level=logging.DEBUG,
        format='%(filename)s' '%(message)s' '%(levelname)s' '%(asctime)s' '%(lineno)s'
    )